package com.ytjj.qmyx.mall.service;

import com.alibaba.fastjson.JSONObject;
import com.github.binarywang.wxpay.config.WxPayConfig;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.ytjj.qmyx.mall.model.ComplaintsHistoryResponse;
import com.ytjj.qmyx.mall.model.request.WxComplaintsCallBackRequest;
import com.ytjj.qmyx.mall.model.WxComplaintsReplyRequest;
import com.ytjj.qmyx.mall.model.response.WxComplaintsCallBackResponse;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

public interface ComplaintsService {
    /**
     * 商户上传反馈图片
     * @param fileUrl
     * @return
     */
    String complaintsImagesUpLoad(String  fileUrl, String complaintId)throws Exception;

    /**
     * 保存微信投诉
     * @param response
     */
    void createComplaints(WxComplaintsCallBackRequest request,WxComplaintsCallBackResponse response)throws Exception;

    /**
     *回复用户
     * @param replyRequest
     * @return
     */
    JSONObject wxComplaintsV3Response(WxComplaintsReplyRequest replyRequest)throws Exception;

    /**
     * 更新微信投诉信息
     * @param response
     */
    void updateComplaints(WxComplaintsCallBackRequest request,WxComplaintsCallBackResponse response)throws Exception;

    /**
     * 查询投诉单详情
     * @param complaintId
     * @return
     */
    JSONObject queryComplaintsV3(String complaintId)throws Exception;

    /**
     *  查询投诉单协商历史
     * @param complaintId
     * @return
     */
    List<ComplaintsHistoryResponse> wxComplaintsV3History(String complaintId)throws Exception;

    /**
     * 反馈处理完成
     * @param complaintId
     * @return
     */
    JSONObject wxComplaintsV3Complete(String complaintId,Integer adminId)throws Exception;


    List<String> downLoadComplaintsHistoryImg(List<String> list, WxPayConfig config) throws WxPayException;

    /**
     * 发送回复短信
     * @param phone 投诉人手机号
     * @param content 投诉内容
     * @param userPhone 订单收件人手机号
     */
    void sendComplaintsMsg(String phone, String content, String userPhone);
}
